package contract_enum

// 合同办理状态
type contractHandleStatus int

var ContractHandleStatus contractHandleStatus

// 办理中
func (c *contractHandleStatus) Handling() int {
	return 1
}

// 办理完成
func (c *contractHandleStatus) Finish() int {
	return 2
}

// 退回
func (c *contractHandleStatus) SendBack() int {
	return 3
}

func (c *contractHandleStatus) ToText(value int) string {
	switch value {

	case 1:
		return "办理中"

	case 2:
		return "办理完成"

	case 3:
		return "退回"

	}
	return ""
}

func (c *contractHandleStatus) ToValue(text string) int {
	switch text {

	case "办理中":
		return 1

	case "办理完成":
		return 2

	case "退回":
		return 3

	}
	return 0
}
